#include <iostream>
#include <algorithm>
#include <cmath>
#include <iomanip>
using namespace std;
#define MAXN 505
struct edge{
    int a{}, b{};
    double w{};
    bool operator <(const edge &y)const{
        return w < y.w;
    }
}e[MAXN*MAXN];

int fa[MAXN], vis[MAXN], x[MAXN], y[MAXN];
int find(int a){
    return fa[a] == a ? a : fa[a] = find(fa[a]);
}

int main() {
    int S, N;
    cin >> S >> N;
    for(int i=1; i<=N; ++i) fa[i] = i;
    for(int i=1; i<=N; ++i){
        cin >> x[i] >> y[i];
    }
    int M = 0;
    for(int r=1; r<=N; ++r){
        for(int c=r+1; c<=N; ++c){
            ++M;
            e[M].a = r; e[M].b = c;
            int dx = x[r] - x[c], dy = y[r] - y[c];
            e[M].w = sqrt(dx*dx + dy*dy);
        }
    }
    double ans;
    int cnt = 0;
    sort(e+1, e+1+M);
    for(int i=1; i<=M; ++i){
        if(find(e[i].a) != find(e[i].b)){
            fa[find(e[i].a)] = find(e[i].b);
            ans = e[i].w;
            cnt ++;
            if(cnt == N-S) break;
        }
    }
    cout<< fixed << setprecision(2) << ans << endl;
    return 0;
}
